//
//  SEHospitalizeOrderDoctorCell.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/4/16.
//

import UIKit

class SEHospitalizeOrderDoctorCell: UITableViewCell {

    static let className = "SEHospitalizeOrderDoctorCell"
    static let reuseId = className


    @IBOutlet weak var avatorImgView: UIImageView! {
        didSet {
            avatorImgView.layer.cornerRadius = avatorImgView.frame.size.height / 2.0
            avatorImgView.layer.masksToBounds = true
        }
    }

    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var titleAndDeptLabel: UILabel!
    @IBOutlet weak var hospitalNameLabel: UILabel!

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    func updateCell(_ viewModel: SEHospitalizeOrderDetailViewModel) {
        avatorImgView.kf.setAvatarImage(urlString: viewModel.model.otherPhoto)
        nameLabel.text = viewModel.model.doctorName
        titleAndDeptLabel.text = viewModel.jobAndDeptDescribe
        hospitalNameLabel.text = viewModel.model.hospitalName ?? " "
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
